SkipWhile(TSource) Method (ParallelQuery(TSource), Func(TSource, Int32, Boolean))

Task Parallel System.Threading

Bypasses elements in a parallel sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.

Namespace:  System.Linq
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function SkipWhile(Of TSource) ( _
	source As ParallelQuery(Of TSource), _
	predicate As Func(Of TSource, Integer, Boolean) _
) As ParallelQuery(Of TSource)
C#
public static ParallelQuery<TSource> SkipWhile<TSource>(
	ParallelQuery<TSource> source,
	Func<TSource, int, bool> predicate
)

Parameters

source
Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
The sequence to return elements from.
predicate
Type: System..::.Func<(Of <(TSource, Int32, Boolean>)>)
A function to test each source element for a condition; the second parameter of the function represents the index of the source element.

Type Parameters

TSource
The type of elements of source.

Return Value

A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

Exceptions

ExceptionCondition
System..::.ArgumentNullException source or predicate is a null reference (Nothing in Visual Basic).

See Also